﻿@model IEnumerable<BudgetApp.Data.Models.TrackBill>


@{
    ViewBag.Title = "Index";
}

<div class="col-md-12">
    <h2>Index</h2>

    <p>
        @Html.ActionLink("Create New", "Create")
    </p>
    <table class="table tablesorter" id="bIndex">
        <tr>
            <th>
                @Html.DisplayNameFor(model => model.InputType.Type)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.Category.CategoryType)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.SubCategory.SubCategoryType)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.DateDue)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.Amount)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.Description)
            </th>
            <th></th>
        </tr>

        @foreach (var item in Model)
        {
            <tr>
                <td>
                    @Html.DisplayFor(modelItem => item.InputType.Type)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Category.CategoryType)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.SubCategory.SubCategoryType)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.DateDue)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Amount)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Description)
                </td>
                <td>
                    @Html.ActionLink("Edit", "Edit", new { id = item.BillId }) |
                    @Html.ActionLink("Details", "Details", new { id = item.BillId }) |
                    @Html.ActionLink("Delete", "Delete", new { id = item.BillId })
                </td>
            </tr>
        }

    </table>
</div>


    <script>
        $(document).ready(function() {
                $("bIndex").tablesorter();
            }
        );

    </script>
 

